package ua.edu.nuos.jeetraining2012.cms.dto;

import java.io.Serializable;
import java.util.Date;

/**
 * @author Victor N. Ganichev victor.ganichev@gmail.com
 * @version 1.0 Date: 26.06.13 Time: 11:54
 * @since 1.0
 */
public class HomeWorkDTO implements Serializable {

    /** Define HW ID. */
    private long id;

    /** Define HW title. */
    private String homeWorkTitle;

    /** Define HW due date. */
    private Date dueDate;

    /** Define material ID. */
    private long materialId;

    /** Define material title. */
    private String materialTitle;

    // Constructor
    public HomeWorkDTO() {}

    // Getters & Setters
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getHomeWorkTitle() {
        return homeWorkTitle;
    }

    public void setHomeWorkTitle(String homeWorkTitle) {
        this.homeWorkTitle = homeWorkTitle;
    }

    public Date getDueDate() {
        return dueDate;
    }

    public void setDueDate(Date dueDate) {
        this.dueDate = dueDate;
    }

    public long getMaterialId() {
        return materialId;
    }

    public void setMaterialId(long materialId) {
        this.materialId = materialId;
    }

    public String getMaterialTitle() {
        return materialTitle;
    }

    public void setMaterialTitle(String materialTitle) {
        this.materialTitle = materialTitle;
    }

    // Overrides
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        HomeWorkDTO that = (HomeWorkDTO) o;

        if (id != that.id) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return (int) (id ^ (id >>> 32));
    }

    @Override
    public String toString() {
        return "HomeWorkDTO{" +
                "id=" + id +
                ", dueDate=" + dueDate +
                ", materialId=" + materialId +
                ", materialTitle='" + materialTitle + '\'' +
                '}';
    }
}
